using System.Collections.Generic;

namespace Dewin.BO.Model
{
    /// <summary>
    /// Lop dinh nghia trang nao se su dung
    /// </summary>
    public class Provider
    {
        public const string IdStructure = "{0}-{1}-{2:000}";

        /// <summary>
        /// Ma cua SBO
        /// </summary>
        public const string Sbo = "SBO";

        /// <summary>
        /// Ma cua IBC
        /// </summary>
        public const string Ibc = "IBC";

        /// <summary>
        /// Lay ve ma Provider dua vao id
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static string GetProvider(string id)
        {
            var array = id.Split('-');
            if (array.Length == 3)
            {
                return array[1];
            }
            return string.Empty;
        }

        /// <summary>
        /// Lay ve ma Provider dua vao id
        /// </summary>
        /// <returns></returns>
        public static List<string> GetProvider()
        {
            return new List<string> { Sbo, Ibc };
        }
    }
}
